package com.sky.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

@ApiModel
@Data
public class EmployeeDTO implements Serializable {

    @ApiModelProperty("用户id")
    private Long id;
    @ApiModelProperty("用户名")
    @NotEmpty
    private String username;
    @NotEmpty
    @ApiModelProperty("姓名")
    private String name;
    @ApiModelProperty("电话")
    @NotEmpty
    @Pattern(regexp = "^[0-9]{11}$")
    private String phone;
    @ApiModelProperty("性别")
    @NotEmpty
    private String sex;
    @Pattern(regexp = "^[0-9]{18}$")
    @ApiModelProperty("身份证号")
    private String idNumber;

}
